<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="<%=basePath%>js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/myjs.js"></script>
<title>操作票文件目录</title>
</head>
<body>
	<h2 align="center">操作票文件目录</h2>
	<hr>
	<div id="table1">
		<table align="center">
			<tr>
				<td width="400px">目录：/ 
					<a href="javascript:void(0);">${realPath }</a>/
				</td>
				<td width="360px">
					<input type="button" onclick="upFolder('${absolutePath }','<%=basePath%>')" value="上一级"> 
					<input type="button" onclick="window.location.href='<%=basePath%>czp'" value="根目录">
					<input type="button" onclick="createFolder('${absolutePath }','<%=basePath%>')" value="新建文件夹"> 
					<input type="button" onclick="upload('${absolutePath }','<%=basePath%>')" value="上传文件到此目录"></td>
			</tr>
			<c:forEach items="${fileNameList }" var="file">
			<tr>
				<td align="left">
				<input type="hidden" id="baseUrl" value="<%=basePath%>" />
					<c:if test="${file.isDirectory == 1 }">
						<font color="black">${file.fileName }</font>
					</c:if> 
					<c:if test="${file.isDirectory == 0 }">
						<a style="text-decoration: none" href="javascript:void(0);" onclick="testTry('${file.fileName }','${absolutePath }','1','<%=basePath%>')">${file.fileName}</a>
					</c:if>
				</td>
				<td align="center" width="360px">${file.time }--------------------- 
					<a style="text-decoration: none" href="javascript:void(0);" onclick="deleteFile('${file.fileName }','${absolutePath }','<%=basePath%>')">删除</a>
				</td>
			</tr>
			</c:forEach>
		</table>
	</div>
</body>
</html>